#pragma once

#include "Game/Process/RenderProcess.h"
#include "Render/Texture/Picture2DTexture.h"
#include "Render/Texture/RenderTarget.h"
#include "Render/Tradition/RHIRenderPass.h"
#include "Render/Tradition/GraphicsPipeline.h"
#include "Render/Texture/ColorRenderTarget.h"
#include "Render/Texture/CubemapTexture.h"
#include "Render/Texture/DepthRenderTarget.h"
#include "Render/Shader/RHIDescriptor.h"
#include "Render/Tradition/RHIFramebuffer.h"

class LocalScene;
class VoxelProcess;
class BeamProcess;


class TracerProcess : public RenderProcess
{
	DECLARE_PROCESS(TracerProcess)

	struct PushConstants
	{
		uint32 width;
		uint32 height;
		uint32 beamEnable;
		uint32 beamSize;
		uint32 viewType;
	};

public:

	bool mBeamEnable;

	int32 mViewType;

protected:

	virtual void OnInit() override;

	virtual void OnTick(float deltaTime) override;

	virtual void OnResize() override;

protected:


	LocalScene* mLocalScene;

	VoxelProcess* mVoxelProcess;

	BeamProcess* mBeamProcess;


	RefCountPtr<RHISampler> mBeamSampler;


	RefCountPtr<RHIDescriptor> mDescriptor;

	DescriptorMask mDescriptorMask;


	RefCountPtr<GraphicsPipeline> mPipeline;

	RefCountPtr<RHIRenderPass> mRenderPass;

	RefCountPtr<RHIFrameBuffer> mFrameBuffer;

	RefCountPtr<ColorRenderTarget> mColorRenderTarget;

};
